# -*- encoding=utf8 -*-
__author__ = "ASUS"

from airtest.core.api import *

auto_setup(__file__)


y=0
while y<10000000:
    swipe((800,200),(800,300))
    swipe((800,200),(800,300))
    sleep(3)

    touch((850,240))
    sleep(18)
    touch((480,437))
    sleep(1)
    touch((659,355))
    sleep(5)

    
    if   exists(Template(r"tpl1650981354520.png", threshold=0.9000000000000001, record_pos=(0.401, 0.181), resolution=(960, 540))):
        
        touch(Template(r"tpl1650981354520.png", threshold=0.9000000000000001, record_pos=(0.401, 0.181), resolution=(960, 540)))
        sleep(1.0)
        wait(Template(r"tpl1646715509955.png", threshold=0.8, record_pos=(-0.454, -0.205), resolution=(2160, 1080)),timeout=480,interval=2)
        sleep(3)
        
        touch((140,500))
        sleep(3)
        touch((40,108))
        sleep(3)
        touch((400,22))
        sleep(3)
        touch((316,200),times=20,duration=0.1)
        sleep(3)
        touch((726,100))
        sleep(3)
        touch((450,5))
        sleep(3) 
        touch((691,438))
        sleep(3)


    else :
        sleep(1.0)
        


    touch((450,5))
    sleep(3) 
    touch((140,500))
    sleep(3) 
    touch((40,108))
    sleep(3) 
    touch((400,22))
    sleep(3) 
    touch((316,200),times=20,duration=0.1)
    sleep(3) 
    touch((726,100))
    sleep(3)
    touch((450,5))
    sleep(3) 





        

    y=y+1    
       